/**
 * 
 */
package com.cloudcast.client.presenter;

import com.cloudcast.client.controller.Controller;
import com.cloudcast.client.controller.Responsible;
import com.cloudcast.client.view.DashboardMainView;
import com.extjs.gxt.ui.client.widget.LayoutContainer;
import com.google.gwt.event.shared.HandlerManager;

/**
 * @author Samuel García Martínez <in0de>
 *
 */
public class DashboardMainPresenter extends AbstractPresenter {

	private DashboardMainView view;
	
	public DashboardMainPresenter(Responsible parent, HandlerManager eventBus) {
		super(parent, eventBus);
	}
	
	/* (non-Javadoc)
	 * @see com.cloudcast.client.presenter.Presenter#go(com.google.gwt.user.client.ui.Widget)
	 */
	@Override
	public void go(LayoutContainer container) {
		container.add(getView().asContainer());		
	}

	/* (non-Javadoc)
	 * @see com.cloudcast.client.controller.Responsible#bind(com.cloudcast.client.controller.Controller)
	 */
	@Override
	public void bind(Controller controller) {
		// TODO Auto-generated method stub

	}

	/* (non-Javadoc)
	 * @see com.cloudcast.client.controller.Responsible#getId()
	 */
	@Override
	public String getId() {
		// TODO Auto-generated method stub
		return null;
	}

	/* (non-Javadoc)
	 * @see com.cloudcast.client.controller.Responsible#unbind(com.cloudcast.client.controller.Controller)
	 */
	@Override
	public void unbind(Controller controller) {
		// TODO Auto-generated method stub

	}

	@Override
	public DashboardMainView getView() {
		if(this.view == null)
			this.view = new DashboardMainView();
		
		return this.view;
	}

}
